package org.example.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

import org.example.entity.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.example.enums.BankCardTypeEnums;
import org.example.enums.BankFormTypeEnums;

/**
 * <p>
 * 卡种类介绍信息
 * </p>
 *
 * @author puqingwen
 * @since 2024-03-18
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("tb_bank_card_introduce")
public class BankCardIntroduceEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 类型: CARD_KIND:卡种类，ASK_FOR:要求，INFORMATION：资料，FLOW：开户流程，SUPPORT_OPEN_TYPE：支持的开户方,FORM:表单信息
     */
    private BankCardTypeEnums type;

    /**
     * 卡id
     */
    private Long cardId;

    /**
     * 信息值
     */
    private String infoVal;

    /**
     * 是否必需
     */
    private Boolean isRequire;

    /**
     * 排序
     */
    private Integer sort;

    // 值介绍
    private String valComment;

    public Integer getSort() {
        if (null == sort) {
            return 0;
        }
        return sort;
    }
}
